<div id="tabs" class="tabs">
    <ul>
        <li><a href="#tabs-1">Núcleo básico</a></li>
        <?php
        if (is_numeric($model->NCLBID)) {
            echo '<li><a href="#tabs-2">Alias y Módulos</a></li>';
        }
        ?>
    </ul>
    <div id="tabs-1" class="form">   
        <?php
        $form = $this->beginWidget('GxActiveForm', array(
            'id' => 'nucleosbasicos-form',
            'enableAjaxValidation' => true,
                ));
        ?>

        <p class="note">
<?php echo Yii::t('app', 'Campos con '); ?> <span class="required">*</span> <?php echo Yii::t('app', ' son requeridos'); ?>.
        </p>

<?php echo $form->errorSummary($model); ?>

        <div class="row">
            <?php echo $form->labelEx($model, 'NCLBNOMBRE', array('class' => 'label_info')); ?>
            <?php echo $form->textArea($model, 'NCLBNOMBRE', array('maxlength' => 100, 'class' => 'Ctextarea')); ?>
<?php echo $form->error($model, 'NCLBNOMBRE'); ?>
        </div><!-- row -->
        <div style=" display: inline;" >
            <div id="divGrupos" class="row" style=" width: 54%; float:left;">
                <?php echo $form->labelEx($model, 'EST_ID', array('class' => 'label_info')); ?>
                <?php echo $form->dropDownList($model, 'EST_ID', GxHtml::listDataEx(Estadosnucleos::model()->findAllAttributes(null, true)), array('class' => 'Ccombo')); ?>
<?php echo $form->error($model, 'EST_ID'); ?>
            </div><!-- row -->
            <div class="row" style=" width: 46%; float:right;">
                <?php echo $form->labelEx($model, 'MOM_ID', array('class' => 'label_info')); ?>
                <?php echo $form->dropDownList($model, 'MOM_ID', GxHtml::listDataEx(Momentos::model()->findAllAttributes(null, true)), array('class' => 'Ccombo')); ?>
<?php echo $form->error($model, 'MOM_ID'); ?>
            </div><!-- row -->
            <div style="clear:both;"></div>
        </div>               
        <div class="fechaaud" >
            <div  style="display: inline;" >
                <div class="row" style=" width: 49%; float:left; text-align: center;">
                    <?php echo $form->labelEx($model, 'NCLBFECHACREACION', array('class' => 'label_info')); ?>
                    <?php echo $form->textField($model, 'NCLBFECHACREACION', array('disabled' => true, 'class' => 'CfechaT')); ?>
<?php echo $form->error($model, 'NCLBFECHACREACION'); ?>
                </div><!-- row -->
                <div class="row" style=" width: 49%; float: right; text-align: center;">
                    <?php echo $form->labelEx($model, 'NCLBFECHAACTUALIZACION', array('class' => 'label_info')); ?>
                    <?php echo $form->textField($model, 'NCLBFECHAACTUALIZACION', array('disabled' => true, 'class' => 'CfechaT')); ?>
<?php echo $form->error($model, 'NCLBFECHAACTUALIZACION'); ?>
                </div><!-- row -->
                <div style="clear:both;"></div>
            </div>
        </div>
        <div class="center-submit">            
            <?php
            echo GxHtml::submitButton(Yii::t('app', 'Guardar'), array('class' => 'add_input'));
            ?>
        </div>
    </div>
    <?php
    if (is_numeric($model->NCLBID)) {
        echo '<div id="tabs-2" class="form">';
        echo '<div class="row">';
        echo '<div class="modulo_nucleo">';
        echo CHtml::label('modulo', 'Módulo', array('class' => 'label_info'));
        echo CHtml::dropDownList('modulo_id', '', GxHtml::listDataEx(Modulos::model()->findAll(array('order' => 'MODORDEN'))), array('class' => 'Ccombo CcomboM', 'prompt' => ''));
        echo '<div class="ui-widget">';
        echo CHtml::label('Alias', 'Alias', array('class' => 'label_info'));
        echo CHtml::dropDownList('alias_id', '', array(), array('class' => 'Ccombo CcomboM', 'disabled' => 'disabled', 'prompt' => ''));
        //echo CHtml::dropDownList('alias_id','',  GxHtml::listDataEx(Alias::model()->findAll('ALSID NOT IN (SELECT ALS_ID FROM NUCLEOSBASICOSALIAS WHERE NCLB_ID='.$model->NCLBID.')',array('order'=>'ALSNOMBRE')),null,'ALSNOMBRE') , array('class'=>'Ccombo CcomboM', 'disabled'=>'disabled', 'prompt' =>''));
        echo "</div>";
        echo '<h4 class="title-nucleos">CAMPOS PRESELECCIONADOS</h4>';
        echo '<div class="alias-disponibles" tipo="0">';
        echo '</div>';
        echo '<h4 class="title-nucleos">CAMPOS ESCOGIDOS</h4>';
        echo '<div class="alias-nucleos">';
        echo '</div>';
        echo '<div  class="flotante-save" >' . GxHtml::button(Yii::t('app', 'Guardar Ordén'), array('class' => 'add_input saveordernucleo', 'onclick' => 'save_order_nucleos(' . $model->NCLBID . ');')) . "</div>";
        echo '</div>';
        echo "</div>";
        echo "</div>";
        echo '<input id="nucleo_basico_id" type="hidden" value="' . $model->NCLBID . '"/>';
    }

    $this->endWidget();
    ?>
    <div class="dialog-message">
        <p class="dialog-content">
        </p>
    </div>
    <div class="upprogress">
        <img alt="Cargando..." src="images/loading.gif" />
    </div>
</div>